package com.xlf.service.base.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xlf.common.core.exception.BizException;
import com.xlf.common.core.util.BeanCopyUtils;
import com.xlf.common.core.util.page.TableDataInfo;
import com.xlf.pojo.base.Problem;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xlf.service.base.pojo.dto.ProblemReqDTO;
import com.xlf.service.base.pojo.vo.ProblemDetailVO;
import com.xlf.service.base.pojo.vo.ProblemRefVO;
import com.xlf.service.base.pojo.vo.ProblemVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author 小新
 * @description 针对表【problem】的数据库操作Service
 * @createDate 2023-10-03 10:21:22
 */
public interface ProblemService extends IService<Problem> {

    /**
     * 主页面获取题目列表，只允许获取到公有题目
     * @param reqDTO
     * @return
     */
    TableDataInfo<ProblemVO> getProblemVOList(ProblemReqDTO reqDTO);

    /**
     * 后台获取题目列表
     * @param problem
     * @return
     */
    List<Problem> getProblemList(Problem problem);


    Problem getProblem(Long id);

    Problem saveOrUpdate_(Problem problem);

    boolean updateStatus(Problem problem);

    void copyProblem(List<Long> ids);

    void correctionProblem(List<Problem> problemList);

    void delete(List<Long> ids);

    /**
     * 获取最近的5条题目
     * @return
     */
    List<ProblemVO> getRecentlyProblemVOList();


    /**
     * 导出题目列表
     * @param ids
     */
    void exportProblem(List<Long> ids);


}
